$(function(){
    window.onload = function(){
        $.ajax({
            url:'http://localhost:3000/guid/hot',
            mothed:'get',
            success:function(res){
                var str = '';
                $.each(res,function(index,item){
                    str += 
                    "<div class=first>"+
                    "<img src="+item.img+" width=250px>"+
                    "<p>"+item.text+"</p>"+
                    "<p class=zan>"+
                        "<img src=../img/zan.png width=15px>" +item.like+
                        "<img src=../img/xin.png width=15px>" +item.words+
                    "</p>"+
                "</div>"
                })
                $('.new').html(str);
            }
        })
    }
})